package com.imu.aop.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.imu.aop.entity.LoginInfo;
import com.imu.aop.service.ILoginInfoService;
import org.aspectj.apache.bcel.generic.RET;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhangjia
 * @since 2023-05-26
 */
@RestController
@RequestMapping("/logininfo")
public class LoginInfoController {
    @Autowired
    ILoginInfoService iLoginInfoService;
    @GetMapping
    public List<LoginInfo> getLoginfo(String id){
        System.out.println(id);
        LambdaQueryWrapper<LoginInfo> wrapper =new LambdaQueryWrapper<>();
        wrapper.eq(LoginInfo::getId,id);
        List<LoginInfo> loginInfos = iLoginInfoService.list(wrapper);
        return loginInfos;
    }

}
